package org.dromara.business.domain.bo;

import org.dromara.business.domain.GoodsOrder;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.math.BigDecimal;

/**
 * 订单业务对象 goods_order
 *
 * @author Lion Li
 * @date 2025-06-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = GoodsOrder.class, reverseConvertGenerate = false)
public class GoodsOrderBo extends BaseEntity {

    /**
     * 订单编号
     */
    @NotNull(message = "订单编号不能为空", groups = {EditGroup.class})
    private Long goodsOrderId;

    /**
     * 商品id
     */
    @NotNull(message = "商品id不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long goodsId;

    /**
     * 商品名称
     */
    @NotBlank(message = "商品名称不能为空", groups = {AddGroup.class, EditGroup.class})
    private String name;

    /**
     * 商品图片id
     */
    @NotBlank(message = "商品图片id不能为空", groups = {AddGroup.class, EditGroup.class})
    private String url;

    /**
     * 商品价格
     */
    @NotNull(message = "商品价格不能为空", groups = {AddGroup.class, EditGroup.class})
    private BigDecimal price;

    /**
     * 商品介绍
     */
    @NotBlank(message = "商品介绍不能为空", groups = {AddGroup.class, EditGroup.class})
    private String info;

    /**
     * 一级分类, 保存文字
     */
    @NotBlank(message = "一级分类, 保存文字不能为空", groups = {AddGroup.class, EditGroup.class})
    private String oneType;
    private Long oneTypeId;
    /**
     * 二级分类, 保存文字
     */
    @NotBlank(message = "二级分类, 保存文字不能为空", groups = {AddGroup.class, EditGroup.class})
    private String type;

    /**
     * 订单状态（1待付款 2待接单 3进行中 4服务完成(待客户确认) 5已完成 6已退款 ）
     */
    @NotBlank(message = "订单状态（1待付款 2待接单 3进行中 4服务完成(待客户确认) 5已完成 6已退款 ）不能为空", groups = {AddGroup.class, EditGroup.class})
    private String status;

    /**
     * 联系手机号
     */
    @NotBlank(message = "联系手机号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String phone;

    /**
     * 游戏ID
     */
    @NotBlank(message = "游戏ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private String gameIdNo;

    /**
     * 游戏区服
     */
    @NotBlank(message = "游戏区服不能为空", groups = {AddGroup.class, EditGroup.class})
    private String gameAreaType;

    /**
     * 下单备注
     */
    @NotBlank(message = "下单备注不能为空", groups = {AddGroup.class, EditGroup.class})
    private String remark;

    /**
     * 打手id
     */
    @NotNull(message = "打手id不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long waiterId;

    /**
     * 订单类型（其他或者不传: 客户订单 1打手订单）
     */
    private Integer isWaiter;

    /**
     * 优惠券id
     */
    private Long couponId;
    /**
     * 服务截图
     */
    private String serverImg;

    /**
     * 队友id(参与分佣)
     */
    private String memberIds;

    /**
     * 购物车购买标识
     */
    private Long buyFlag;
}
